import request from '@/utils/request'

// 获取列表数据
export function getManageBudgetList(params) {
  return request({
    url: '/ysManageBudget/getManageBudgetList',
    method: 'POST',
    data: params
  })
}

// 获取资产类列表
export function getAssetInfoList(params) {
  return request({
    url: '/ysManageAsset/getAssetInfoList',
    method: 'POST',
    data: params
  })
}

// 获取业务配套指标列表
export function getYsBusinessTargetList(params) {
  return request({
    url: '/ysBusinessTarget/getYsBusinessTargetList',
    method: 'POST',
    data: params
  })
}

// 新增费用类
export function insertManageBudget(params) {
  return request({
    url: '/ysManageBudget/insertManageBudget',
    method: 'POST',
    data: params
  })
}

// 更新费用类
export function updateManageAccountByNum(params) {
  return request({
    url: '/ysManageBudget/updateManageAccountByNum',
    method: 'POST',
    data: params
  })
}

// 删除费用类
export function deleteByNum(params) {
  return request({
    url: `/ysManageBudget/deleteByNum/${params.id}`,
    method: 'GET'
  })
}

// 新增资产类
export function insertManageAsset(params) {
  return request({
    url: '/ysManageAsset/insertManageAsset',
    method: 'POST',
    data: params
  })
}

// 更新资产类
export function updateManageAssetByNum(params) {
  return request({
    url: '/ysManageAsset/updateManageAssetByNum',
    method: 'POST',
    data: params
  })
}

// 删除资产类
export function deleteByNumOther(params) {
  return request({
    url: `/ysManageAsset/deleteByNum/${params.id}`,
    method: 'GET'
  })
}

// 新增指标
export function insertYsBusinessTarget(params) {
  return request({
    url: '/ysBusinessTarget/insertYsBusinessTarget',
    method: 'POST',
    data: params
  })
}

// 更新指标
export function updateYsBusinessTarget(params) {
  return request({
    url: '/ysBusinessTarget/updateYsBusinessTarget',
    method: 'POST',
    data: params
  })
}

// 删除指标
export function deleteYsBusinessTarget(params) {
  return request({
    url: `/ysBusinessTarget/deleteYsBusinessTarget/${params.id}`,
    method: 'GET'
  })
}

// 费用类发布
export function mbReleaseData(params) {
  return request({
    url: '/ysManageBudget/releaseData',
    method: 'POST',
    data: params
  })
}

// 费用类导出
export function exportExcelYsManageBudget(params) {
  return request({
    url: '/ysManageBudget/exportExcelYsManageBudget',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 资产类发布
export function maReleaseData(params) {
  return request({
    url: '/ysManageAsset/releaseData',
    method: 'POST',
    data: params
  })
}

// 资产类导出
export function exportExcelYsManageAsset(params) {
  return request({
    url: '/ysManageAsset/exportExcelYsManageAsset',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 业务量配套指标发布
export function btReleaseData(params) {
  return request({
    url: '/ysBusinessTarget/releaseData',
    method: 'POST',
    data: params
  })
}

// 业务量配套指标导出
export function exportExcelYsBusinessTarget(params) {
  return request({
    url: '/ysBusinessTarget/exportExcelYsBusinessTarget',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 业务量配套指标继承
export function extendsData(params) {
  return request({
    url: '/ysBusinessTarget/extendsData',
    method: 'POST',
    data: params
  })
}

// 费用类查询修订记录
export function mbGetModifyRecordList(params) {
  return request({
    url: '/ysManageBudget/getModifyRecordList',
    method: 'POST',
    data: params
  })
}

// 费用类撤销
export function mbRevokeRecord(params) {
  return request({
    url: '/ysManageBudget/revokeRecord',
    method: 'POST',
    data: params
  })
}

// 资产类查询修订记录
export function maGetModifyRecordList(params) {
  return request({
    url: '/ysManageAsset/getModifyRecordList',
    method: 'POST',
    data: params
  })
}

// 资产类撤销
export function maRevokeRecord(params) {
  return request({
    url: '/ysManageAsset/revokeRecord',
    method: 'POST',
    data: params
  })
}

// 业务量配套指标查询修订记录
export function btGetRecordList(params) {
  return request({
    url: '/ysBusinessTarget/getRecordList',
    method: 'POST',
    data: params
  })
}

// 业务量配套指标撤销
export function btRevokeRecord(params) {
  return request({
    url: `/ysBusinessTarget/revokeRecord/${params.id}`,
    method: 'GET'
  })
}

// 业务量配套指标下载模板
export function downloadTargetDemo(params) {
  return request({
    url: '/ysBusinessTarget/download_ex',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 业务量配套指标导入
export function importTarget(params) {
  return request({
    url: '/ysBusinessTarget/import',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 业务量配套指标导入
export function listYsManageAssetDepartment(params) {
  return request({
    url: '/ysDepartment/listYsManageAssetDepartment',
    method: 'POST',
    data: params
  })
}

